﻿//Write an expression that calculates trapezoid's area by given sides a and b and height h.

using System;

class CalculatesTrapezoidArea
{
    static void Main()
    {
        Console.WriteLine("Input trapezoid parameters");
        Console.Write("a = ");
        double a = double.Parse(Console.ReadLine());
        Console.Write("b = ");
        double b = double.Parse(Console.ReadLine());
        Console.Write("h = ");
        double h = double.Parse(Console.ReadLine());

        double trapezoidArea = ((a + b) / 2) * h;
        Console.WriteLine(); //separator
        Console.WriteLine("Trapezoid area is: {0}", trapezoidArea);
    }
}
